<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
    <script>
    	(function(){
			function inherit(p){
				if(p==null){
					throw TypeError();
				}
				if(Object.create){
					return Object.create(p);
				}
				var t = typeof p;
				if(t!=="object"&&t!=="function"){
					throw TypeError();
				}
				function f(){};
				f.prototype = p;
				return new f();
			}
			var p = {x:1,y:2};
			var myobj = inherit(p);
			window.myobj = myobj;
    	})();
    </script>
</html>